package com.franklin.validation.core.annotations;

import com.franklin.validation.core.constants.Constants;

import java.lang.annotation.*;

/**
 * Description :检查map中的请求参数，若非必填给与默认值
 * Create By : Franklin
 * Date : 2019/11/27 11:20
 */
@Target({ElementType.PARAMETER,ElementType.ANNOTATION_TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface ParamCheck {

    String value() default "";
    boolean required() default true;
    String defaultValue() default Constants.DEFAULT_VALUE;

    int max() default Integer.MAX_VALUE;
    int min() default 0;
    String message() default "";
    String pattern() default "";

    Class type() default String.class;

    ParamCheckSub[] subParams() default {};
}
